package com.shycloud.mido.member.controller;

import com.shycloud.mido.member.api.entity.AppVersion;
import com.shycloud.mido.member.service.AppVersionService;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.shycloud.mido.common.core.util.R;
import springfox.documentation.annotations.ApiIgnore;

/**
 * 移动端版本管理 controller
 *
 * @author nianhua.jiang
 * @date 2020/8/5
 */
@RestController
@AllArgsConstructor
@RequestMapping("/appVersion")
@ApiOperation("移动端版本管理模块")
@ApiIgnore
public class AppVersionController {

	/** 移动端版本管理 service */
	private final AppVersionService appVersionService;

	/**
	 * 添加app版本信息
	 *
	 * @param appVersion
	 * @return com.shycloud.mido.common.core.util.R
	 * @author nianhua.jiang
	 * @date 2020/8/5 11:03
	 */
	@PostMapping("addAppVersion")
	@ApiOperation("添加app版本信息")
	public R addAppVersion(@RequestBody AppVersion appVersion) {
		return new R(appVersionService.save(appVersion));
	}

}
